package com.handu.luna.core.domain.support;

/**
 * @title:GoodsGroupInfo.java
 * @package com.handu.luna.core.domain.support
 * @author 张恒强
 * @date 2014年9月3日 上午10:37:15
 * @version V1.0
 */
public class GoodsGroupInfo {
	
	private long id;//例如分类ID  品牌ID
	
	private String name;//例如分类名称（颜色、尺寸） 品牌分组前面的品牌两字（某一分组的总名称）
	
	private String subname;//组里面的单元的名称 例如蓝色 紫色，品牌的话：HSTYLE  
	
	private long num;//租里各单元包含的商品的数量

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public String getSubname() {
		return subname;
	}

	public void setSubname(String subname) {
		this.subname = subname;
	}

	public void setName(String name) {
		this.name = name;
	}

	public long getNum() {
		return num;
	}

	public void setNum(long num) {
		this.num = num;
	}

	public GoodsGroupInfo(long id, String name, String subname, long num) {
		super();
		this.id = id;
		this.name = name;
		this.subname = subname;
		this.num = num;
	}
	
	public GoodsGroupInfo(long id, String name) {
		super();
		this.id = id;
		this.name = name;
	}

	public GoodsGroupInfo() {
		super();
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + (int) (id ^ (id >>> 32));
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		result = prime * result + (int) (num ^ (num >>> 32));
		result = prime * result + ((subname == null) ? 0 : subname.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		GoodsGroupInfo other = (GoodsGroupInfo) obj;
		if (id == other.id)
			return true;
		return false;
	}
	
}
